package dataserver.service;

import dataserver.pojo.SceneDevice;
import dataserver.pojo.SceneDeviceRelation;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;

import java.util.List;

public interface SceneDeviceRelationService {

    /**
     * 存储信息
     *
     * @param sourceData
     * @throws Exception
     */
    int save(SceneDeviceRelation sourceData) throws Exception;
    /**
     * 存储信息
     *
     * @param sourceDataList
     * @throws Exception
     */
    int saveAll(List<SceneDeviceRelation> sourceDataList) throws Exception;

    /**
     * 删除信息根据id
     *
     * @param id
     * @throws Exception
     */
    void deleteById(String id) throws Exception;

    /**
     * 分页查询数据
     *
     * @param specification
     * @param pageable
     * @return
     * @throws Exception
     */
    Page<SceneDeviceRelation> findPageData(Specification<SceneDeviceRelation> specification, Pageable pageable) throws Exception;

    /**
     * 分页查询数据
     *
     * @param specification
     * @param pageable
     * @return
     * @throws Exception
     */
    List<SceneDeviceRelation> findData(Specification<SceneDeviceRelation> specification) throws Exception;

    /**
     * 查询信息根据站场id
     *
     * @return
     * @throws Exception
     */
    List<SceneDeviceRelation> findAll() throws Exception;

    /**
     * 查询信息根据站场id
     *
     * @param deviceIds
     * @return
     * @throws Exception
     */
    List<SceneDeviceRelation> findByUnrealName(String deviceIds) throws Exception;

}